var $,
    form;
layui.use(['jquery', 'form'], function () {
    $ = layui.jquery,
        form = layui.form;

    $.ajax({
        url:'/Course/getAllCourseClasses',
        async: false,
        dataType: 'json',
        success: function (item) {
            zNodes = item.data;
            item.data.forEach(function(ele, index){
                $('#proTitle').append(new Option(ele.title, ele.categroyId));// 下拉菜单里添加元素
            });
            form.render("select");
        }
    });
});

//搜索
function search () {
    var val= form.val('formTest');
    parent.getTableData(val.selProTitle, val.courseName, val.courseStatus, val.courseIntro, val.id, val.courseNprice);
    var index = parent.layer.index;
    parent.layer.close(index);
}